home *** CD-ROM | disk | FTP | other *** search
-
- /* BOARDX.H This board has the following features.
- -no initialization required
- -busy if high bit of EOC_BYTE is set to 1
- -lower byte stores least significant 4 bits of the result in the
- upper nibble, and most significant 8 bits of result in the high
- byte.
- */
-
- #include <dos.h>
- #define BASE 0x280
- #define EOC_BYTE ( BASE + 2 )
- #define HIGH_BYTE BASE
- #define LOW_BYTE ( BASE + 1 )
- #define CH_SELECT (BASE + 1)
- #define initialize()
- #define select(channel) outportb(CH_SELECT,channel)
- #define start(channel) outportb(CH_SELECT, 0x80 | channel)
- #define wait_for_eoc() while( inportb( EOC_BYTE ) & 0x80 )
- #define convert() (inportb(HIGH_BYTE) * 16 + ( inportb(LOW_BYTE) >> 4 ))
-
- ----------------------------------------------------------------------------
-
- /* BOARDY.H This board has the following features.
- -initialization required
- -busy if high bit of EOC_BYTE is set to 0
- -lower byte stores least significant 8 bits of the result,and
- high byte stores the most significant 4 bits of the result in
- lower nibble.
- */
-
- #define BASE 0x714
- #define STATUS (BASE + 2)
- #define EOC_BYTE (BASE + 2)
- #define CH_SELECT (BASE + 1)
- #define HIGH_BYTE ( BASE + 2 )
- #define LOW_BYTE ( BASE + 1 )
- #define initialize() outp( BASE, 0x80 )
- #define select(channel) outp( CH_SELECT,channel )
- #define start(channel) outp( 0x716, 1 )
- #define wait_for_eoc() while( !( inp( EOC_BYTE) & 0x80 ))
- #define convert() ( inp(HIGH_BYTE) * 256 + inp(LOW_BYTE) )
-
-